<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<s:set var="mailSendBy" value="%{'Print Pack Paper'}" name="mailSendBy" />
<s:if test="%{messageDetail.userByFromId == null && messageDetail.userByFromId == 0}">
	<s:set var="mailSendBy" value="%{'Print Pack Paper'}" />
</s:if>
<s:else>
	<s:set var="mailSendBy" value="%{messageDetail.userByFromId.userId}" />
</s:else>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td colspan="2">
			<div class="blue-text16" style="margin: 0px 0px 0px 0px">
				<s:text name="lable.message.Message" />
			</div>
			<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
			<div style="margin: 0px 0px 12px 0px">
			<div class="MyMessagesPage-mmdbacktofolder"><a href="showMessagingSystem.htm"><s:text name="lable.message.BacktoInbox" /></a></div>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<s:actionerror cssClass="error-text" theme="simple"/>
			<s:actionmessage cssClass="common-text" theme="simple"/>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td class="common-bold-text" width="70%"><s:text name="lable.message.Subject" />: <s:property value="messageDetail.subject"/> </td>
		<td class="common-bold-text" width="70%"><s:text name="lable.message.Received" />:<s:date name="messageDetail.createdOn" format="MM/dd/yyyy" /></td>
	</tr>
	<tr>
		<td class="common-bold-text" width="70%"><s:text name="lable.message.From" />: <s:if test="%{#attr.mailSendBy != null}"> <s:property value="%{#attr.mailSendBy}" /></s:if><s:else>Print Pack Paper</s:else></td>
		<td class="common-bold-text" width="70%"><s:text name="lable.message.Expires" />: <s:date name="messageDetail.expiresDate" format="MM/dd/yyyy" /> </td>
	</tr>
	<tr>
		<td colspan="2"><s:if test="%{#attr.mailSendBy != null}"> <s:property value="%{#attr.mailSendBy}" /></s:if><s:else>Print Pack Paper</s:else>&nbsp;&nbsp;<s:text name="lable.message.parm1" /> <s:property value="messageDetail.userByUserId.firstName" /> <s:property value="messageDetail.userByUserId.lastName" /> (<s:property value="messageDetail.userByUserId.userId"/>).</td>
	</tr>
	<tr>
		<td colspan="2"><s:text name="lable.message.parm2" /></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td bgcolor="#ffe680" colspan="2">
			<h1
				style="font-weight: bold; font-size: 14pt; font-family: arial; color: rgb(0, 0, 0); margin-bottom: 2px; margin-top: 2px;">
				<font face="Verdana, Helvetica, Arial, sans-serif"
					size="4"><b> <s:property value="messageDetail.subject"/> </b>

				</font>
			</h1>
		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td>
			<pre>
				<s:text name="messageDetail.body" />
			</pre>
		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			<table>
				<tr>
					<td>
						<table>
							<tr>
								<td>
									<s:form name="deleteForm" action="deleteMessage" method="post" theme="simple">
										<s:hidden name="messageId" value="%{messageId}"  />
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
										  <tr>
										    <td class="btn-grey-left1"></td>
										    <td valign="top" class="btn-grey-middle1">
											   <div style="margin:1px 0px 0px 0px">
											   	<input name="button" type="submit" class="submit-btn-common1" value="<s:text name="button.Delete" />"  onclick="return wantToDelete('Are You sure you want to delete message');" />
											   </div>
										    </td>
										    <td valign="top" class="btn-grey-right1"></td>
										  </tr>
										</table>
								</s:form>
								</td>
							</tr>
						</table>
					</td>
					<td>
						<table>
							<tr>
								<td>
									<s:form name="forwardMessage" action="forwardMessage" method="post" theme="simple">
										<s:hidden name="messageId" value="%{messageId}"  />
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
											  <tr>
											    <td class="btn-grey-left1"></td>
											    <td valign="top" class="btn-grey-middle1">
												   <div style="margin:1px 0px 0px 0px">
												   	<input name="button" type="submit" class="submit-btn-common1" value="<s:text name="button.Forwardtomyemail" />" />
												   </div>
											    </td>
											    <td valign="top" class="btn-grey-right1"></td>
											  </tr>
											</table>
									</s:form>
								</td>
							</tr>
						</table>
					</td>
					<td>
						<table>
							<tr>
								<td>
									<s:form name="flagForm" action="flagMessage" method="post" theme="simple">
										<s:hidden name="messageId" value="%{messageId}"  />
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
										  <tr>
										    <td class="btn-grey-left1"></td>
										    <td valign="top" class="btn-grey-middle1">
											   <div style="margin:1px 0px 0px 0px">
											   	<input name="button" type="submit" class="submit-btn-common1" value="<s:text name="button.flag" />" />
											   </div>
										    </td>
										    <td valign="top" class="btn-grey-right1"></td>
										  </tr>
										</table>
									</s:form>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
